(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[44279],{54110:function(e,n,t){"use strict";var s,r=t(67597);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var n=1;n0&&k.replace((0,f.dC)(d,_[0].slug))})).catch((function(){A(D("common:error.general"),{status:M.ToastStatus.Error})})).finally((function(){C(!1)}))):((0,x.MY)("guest_enroll_course",{courseId:o,isCTA:s}),k.replace((0,f.gk)((0,f.ES)(d))))};return s?!0===c?(0,r.jsx)(r.Fragment,{}):(0,r.jsx)(m.ZP,{isDisabled:g,isLoading:g,onClick:P,children:D("enroll")}):h?(0,r.jsxs)("div",{className:b().completedContainer,children:[(0,r.jsx)(N.Z,{children:D("completed")}),!1===(null===n||void 0===n?void 0:n.userHasFeedback)&&(0,r.jsx)(y.Z,{course:n,source:y.E.CoursePage})]}):!0===c?(0,r.jsx)(j,{course:n}):(0,r.jsx)(m.ZP,{isDisabled:g,isLoading:g,onClick:P,children:D("enroll")})},k=t(1931),D=t(94945),L=t.n(D),P=function(e){var n=e.title,t=e.description;return(0,r.jsxs)("div",{className:L().container,children:[(0,r.jsxs)("div",{className:L().title,children:["".concat(n,": ")," "]}),(0,r.jsx)("span",{className:L().description,children:t})]})},B=t(3222),T=function(e){var n=e.course,t=(0,a.Z)("learn").t,s=n.description,i=n.dailyMinutes,l=n.lessons,o=void 0===l?[]:l;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(P,{title:t("learn-duration"),description:t("duration-daily",{dailyMins:i,days:o.length})}),(0,r.jsx)(k.iz,{children:(0,r.jsx)(P,{title:t("description"),description:(0,r.jsx)(B.Z,{isEditable:!1,defaultValue:s})})})]})},F=t(75784),H=t.n(F),U=function(e){var n=e.author;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("span",{className:H().author,children:n.name})," ",(0,r.jsx)("span",{children:n.biography})]})},O=t(86021),Y=t.n(O),V=t(99574),K=t(57830),q=t(43609),z=function(e){var n=e.course,t=n.lessons,s=void 0===t?[]:t,i=n.slug,l=(0,a.Z)("learn"),o=l.t,c=l.lang,u=(0,I.jl)();return(0,r.jsx)("div",{className:Y().syllabusContainer,children:s.map((function(e,t){var s=t+1,a=e.title,l=e.isCompleted,d=e.id,h=e.slug,_=(0,f.dC)(i,h);return(0,r.jsxs)("p",{className:Y().container,children:[(0,r.jsx)("span",{className:Y().day,children:"".concat(o("day")," ").concat((0,q.rQ)(s,c))}),(0,r.jsxs)("span",{children:[": ",(0,r.jsx)(K.Z,{onClick:function(){return function(e,t){(0,x.MY)(u?"course_syllabus_day":"guest_course_syllabus_day",{courseId:n.id,dayNumber:e,lessonId:t})}(s,d)},href:u?_:(0,f.gk)(_),variant:K.r.Highlight,children:a}),l?(0,r.jsx)(V.Z,{}):""]})]},t)}))})},G=t(98385),R=t.n(G),W=function(e){var n=e.icon,t=e.value;return(0,r.jsxs)("div",{className:R().container,children:[n," ",(0,r.jsx)("p",{className:R().value,children:t})]})},J=t(71839),Q=t(54110),X=t(3821),$=t(21899);!function(e){e.MAIN="main",e.SYLLABUS="syllabus"}(s||(s={}));var ee=function(e){var n=e.course,t=n.title,i=n.image,l=n.id,o=(0,a.Z)("learn").t,d=(0,u.useState)(s.MAIN),_=d[0],p=d[1],Z=(0,u.useMemo)((function(){return[{name:(0,r.jsx)(W,{icon:(0,r.jsx)(Q.Z,{}),value:o("tabs.main")}),value:s.MAIN},{name:(0,r.jsx)(W,{icon:(0,r.jsx)(X.Z,{}),value:o("tabs.syllabus")}),value:s.SYLLABUS}]}),[o]),C=(0,u.useMemo)((function(){var e;return e={},(0,c.Z)(e,s.MAIN,(0,r.jsx)(T,{course:n})),(0,c.Z)(e,s.SYLLABUS,(0,r.jsx)(z,{course:n})),e}),[n]);return(0,r.jsxs)(g.Z,{children:[(0,r.jsxs)(m.ZP,{onClick:function(){(0,x.MY)("back_to_courses_course_details",{courseId:l})},href:(0,f.ty)(),variant:m.Wu.Ghost,children:[(0,r.jsx)($.Z,{}),(0,r.jsx)("p",{className:v().backText,children:o("back-to-learning-plans")})]}),(0,r.jsxs)("div",{className:v().headerContainer,children:[(0,r.jsx)("div",{children:(0,r.jsx)("p",{className:v().title,children:t})}),(0,r.jsx)(A,{course:n})]}),(0,r.jsx)("div",{className:v().imgContainer,children:(0,r.jsx)(h(),{alt:t,src:i,layout:"fill"})}),(0,r.jsx)(J.Z,{selected:_,items:Z,onSelect:function(e){(0,x.Kz)("course_details_tab_change",{courseId:l,tab:e}),p(e)}}),C[_],_===s.MAIN&&(0,r.jsxs)(r.Fragment,{children:[!n.isUserEnrolled&&(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(A,{course:n,isCTA:!0})}),(0,r.jsx)(P,{title:o("about-author"),description:(0,r.jsx)(U,{author:n.author})}),n.isUserEnrolled&&(0,r.jsx)("div",{className:v().startLearningButton,children:(0,r.jsx)(j,{course:n,isHeaderButton:!1})})]})]})},ne=t(73756),te=t(21648),se=t(55673),re=t(10117),ie=t(86719),ae=t.n(ie),le=function(){return(0,r.jsx)("div",{className:ae().loadingContainer,children:(0,r.jsx)(re.Z,{})})},oe=!0,ce=function(e){var n=e.course,t=(0,a.Z)("learn"),s=t.lang,l=t.t,c=(0,i.useRouter)().query.slug,u=(0,f.ES)(n.slug);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(te.Z,{title:n.title,canonical:(0,f.Z2)(s,u),description:(null===n||void 0===n?void 0:n.metaDescription)||l("learning-plan-meta-desc"),languageAlternates:(0,q.qc)(u)}),(0,r.jsx)("div",{className:ae().pageContainer,children:(0,r.jsx)("div",{className:o().container,children:(0,r.jsx)(se.Z,{children:(0,r.jsx)(ne.Z,{loading:le,queryKey:(0,w.vp)(c),fetcher:E.UK,render:function(e){return(0,r.jsx)(r.Fragment,{children:(0,r.jsx)(ee,{course:e})})}})})})})]})}},9083:function(e){e.exports={backText:"CourseDetails_backText__8Hu7e",headerContainer:"CourseDetails_headerContainer__0KFWS",title:"CourseDetails_title__WmnyB",author:"CourseDetails_author__C0c06",imgContainer:"CourseDetails_imgContainer__iJ_rf",startLearningButton:"CourseDetails_startLearningButton__vdo76"}},30067:function(e){e.exports={completedContainer:"StatusHeader_completedContainer__DjKg6"}},98385:function(e){e.exports={container:"TabSwitcherItem_container__l0AFM",value:"TabSwitcherItem_value__9Zast"}},75784:function(e){e.exports={author:"AuthorDetail_author__QNqjO"}},94945:function(e){e.exports={title:"DetailSection_title__4mbZq",container:"DetailSection_container__CnjV5"}},86021:function(e){e.exports={syllabusContainer:"Syllabus_syllabusContainer__3hJSK",container:"Syllabus_container__vPuDB",day:"Syllabus_day__jG8s6"}},21471:function(e){e.exports={container:"Pill_container__FoIEg",small:"Pill_small__zCILo"}},78170:function(e){e.exports={container:"courses_container__h1_I3"}}},function(e){e.O(0,[46911,15240,26913,41167,47995,22042,49774,92888,40179],(function(){return n=50499,e(e.s=n);var n}));var n=e.O();_N_E=n}]); //# sourceMappingURL=[slug]-897fa94c363f0633.js.map